var mongoose = require('mongoose');
var userSchema = mongoose.Schema({
    "userId":Number,
    "userName":String,
    "password":String,
    "userEmail":String,
    "mobile":String,
    "sex":Number,
    "deptId":[],
    "job":String,
    "state":{
        type:Number,
        default: 1
    },
    "role":{
        type:Number,
        default:1
    },
    "roleList":[],
    "createTime":{
        type:Date,
        default:Date.now()
    },
    "lastLoginTime":{
        type:Date,
        default:Date.now()
    },
    remark:String
})

// example use
module.exports = mongoose.model('user', userSchema);